/**
* @author Oscar Linares - Innovacionweb.com
* @url http://www.innovacionweb.com/foco-inputs-formularios-jquery-css.php
*/

(function ($) {

$.fn.actfocus = function (focusClass) {
	// clase para el foco
	if (!focusClass) focusClass = 'cssfocus';

    return this.each(function () {
        // get jQuery instance of 'this'
        var $$ = $(this);
		
		$$.blur(function () {
			$$.removeClass(focusClass)
		})
		
		$$.focus(function () {
			$$.addClass(focusClass);
		})
    });
};

})(jQuery);